# 游戏主要入口
import pygame

from source import tools, setup
from source.states import main_menu, load_screen, level


def main():
    # 各个状态设置为字典, 分别把对应的阶段传进游戏的主控类，让主控类来区分游戏的进程
    state_dict = {
        'main_menu': main_menu.MainMenu(),
        'load_screen': load_screen.LoadScreen(),
        'level': level.Level()
    }
    game = tools.Game(state_dict, 'main_menu')
    game.run()


if __name__ == '__main__':
    main()
